package operation;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2023-10-22
 * Time：11:55
 */
public class DisplayOperation implements IOperation{
    public void work(BookList bookList) {
        System.out.println("显示图书！");
        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            Book book = bookList.getPos(i);
            System.out.println(book.toString());
        }
    }
}
